package Polymorphic.PolymorphDemo003;

/**
 * ClassName:Cat
 * Package:Polymorphic.PolymorphDemo003
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/24-12:46
 * @Version:v1.0
 */
public class Cat extends Animal{
    public Cat() {
    }

    public Cat(int age, String color) {
        super(age, color);
    }
    @Override
    public void eat(String something){
        System.out.println(getAge()+"岁的"+getColor()+"颜色的猫咪者眼睛侧着头吃"+something);
    }
    public void catchMouse(){
        System.out.println("猫在抓老鼠");
    }
}
